#!/usr/bin/env ruby
require 'rubygems'
require 'jakl'

client = Jakl::Client.new

if ARGV.length == 1
  entity = ARGV.first =~ /^(\w+?): (.*)/
  entity ? client.send($2, $1) : client.send(ARGV.first)
else
  client.send(ARGV.join("\n"))
end
